﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using KardexSist.UserControls.Distributor;
using KardexSist.UserControls.Supervisor;
using KardexSist.UserControls.PreSale;

namespace KardexSist
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
            CargarDatos();
        }
        public void CargarDatos()
        {
        }

        private void _btnDistribuidor_Click(object sender, EventArgs e)
        { 
            try
            {
                _pnlContainer.Controls.Clear();
                CtrlDistributor ctrlDistribuidorActual = new CtrlDistributor();
                _pnlContainer.Controls.Add(ctrlDistribuidorActual);
                ctrlDistribuidorActual.Dock = DockStyle.Fill; 
            }
            catch (Exception ex)
            { 
                throw new Exception(ex.Message.ToString());
            }
        }

        private void _btnSupervisor_Click(object sender, EventArgs e)
        { 
            try
            {
                _pnlContainer.Controls.Clear();
                CtrlSupervisor ctrlSupervisorActual = new CtrlSupervisor();
                _pnlContainer.Controls.Add(ctrlSupervisorActual);
                ctrlSupervisorActual.Dock = DockStyle.Fill; 
            }
            catch (Exception ex)
            { 
                throw new Exception(ex.Message.ToString());
            }
        }

        private void _btnPreventista_Click(object sender, EventArgs e)
        {
            try
            {
                _pnlContainer.Controls.Clear();

                CtrlPreSale ctrlPreventistaActual = new CtrlPreSale();
                _pnlContainer.Controls.Add(ctrlPreventistaActual);
                ctrlPreventistaActual.Dock = DockStyle.Fill; 
            }
            catch (Exception ex)
            {

                throw new Exception(ex.Message.ToString());
            }
        }
    }
}
